/*
 * Sensor.h
 *
 *  Created on: 19.09.2012
 *      Author: Lapchinskiy
 */
#define DEFAULT_DATA_LENGTH 100
#ifndef SENSOR_H_
#define SENSOR_H_
//#include <string>
//#include <iostream>
//#include <ctime>
//#ifdef LOGGING
//#include <typeinfo>
//#endif
//#ifdef LOG_TO_FILE
//#include <fstream>
//#endif

//#include "TimeManager.h"
//#include "BuildConfig.h"
////#include "Logging.h"
//
//#include "Sensor.h"
//#include "PWM.h"
//#include "MagneticSensor.h"
//#include <iostream>
//#include "Sheduler.h"
//#include "ADCModule.h"
//#include "ArrayList.h"
////#include "ScanTask.h"
//#include "CondVaInt.h"
//#include "ConditionVariable.h"
//#include "Condition.h"
//#include "Task.h"
#ifdef PC_DEBUG
#include <string.h>
#include <time.h>
#include <unistd.h>
#endif //PC_DEBUG

//#include "BuildConfig.h"
//#include <stdarg.h>
//#include <stdio.h>
#include "Global_types.h"
//#include "TimeManager.h"
//#include "Logging.h"
//#include "PWM.h"
//#include "MagneticSensor.h"
//#include <iostream>
//#include "Sheduler.h"
//#include "ADCModule.h"
//#include "ArrayList.h"
//#include "CondVaInt.h"
//#include "ConditionVariable.h"
//#include "Condition.h"
#include "Global_includes.h"
class Sensor {
public:
	Sensor();
	Sensor(char* name);
	~Sensor();
	//char* name;
	//ErrorCode init(void);
	ErrorCode init(void *obj, void *args);
	ErrorCode deinit(void);
	static ErrorCode scan(void *args);
	uint16_t* getDataBufPtr(void) const;
	uint16_t getDataLength(void);
	ErrorCode setDataLength(uint16_t length);
	//ErrorCode Sensor::measure(void);
	uint16_t* dataBuf;
private:

#ifdef GLOBAL_LOGGING_ENABLE
		static ModuleType moduleType;
		LogRecord logrec;
#endif //GLOBAL_LOGGING_ENABLE
	uint16_t dataLength;
	ErrorCode errorCode;
};

#endif /* SENSOR_H_ */
